<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-cpp">#if __GLASGOW_HASKELL__ &gt;= 709
</span><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span class="hs-cpp">
#else
</span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span class="hs-cpp">
#endif
</span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Module      :  Graphics.Win32.Icon</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Copyright   :  (c) Alastair Reid, 1997-2003</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Maintainer  :  Esa Ilari Vuokko &lt;ei@vuokko.info&gt;</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- A collection of FFI declarations for interfacing with Win32.</span><span>
</span><span id="line-17"></span><span class="hs-comment">--</span><span>
</span><span id="line-18"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Graphics.Win32.Icon</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html"><span class="hs-identifier">Graphics.Win32.GDI.Types</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.Win32.Types.html"><span class="hs-identifier">System.Win32.Types</span></a></span><span class="hs-cpp">

#include &quot;windows_cconv.h&quot;
</span><span>
</span><span id="line-27"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-28"></span><span class="hs-comment">-- Icons</span><span>
</span><span id="line-29"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="annot"><a href="Graphics.Win32.Icon.html#copyIcon"><span class="hs-identifier hs-type">copyIcon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HICON"><span class="hs-identifier hs-type">HICON</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HICON"><span class="hs-identifier hs-type">HICON</span></a></span><span>
</span><span id="line-32"></span><span id="copyIcon"><span class="annot"><span class="annottext">copyIcon :: HICON -&gt; IO HICON
</span><a href="Graphics.Win32.Icon.html#copyIcon"><span class="hs-identifier hs-var hs-var">copyIcon</span></a></span></span><span> </span><span id="local-6989586621679109202"><span class="annot"><span class="annottext">HICON
</span><a href="#local-6989586621679109202"><span class="hs-identifier hs-var">icon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-33"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO HICON -&gt; IO HICON
forall a. String -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Types.html#failIfNull"><span class="hs-identifier hs-var">failIfNull</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CopyIcon&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO HICON -&gt; IO HICON) -&gt; IO HICON -&gt; IO HICON
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HICON -&gt; IO HICON
</span><a href="Graphics.Win32.Icon.html#c_CopyIcon"><span class="hs-identifier hs-var">c_CopyIcon</span></a></span><span> </span><span class="annot"><span class="annottext">HICON
</span><a href="#local-6989586621679109202"><span class="hs-identifier hs-var">icon</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h CopyIcon&quot;</span><span>
</span><span id="line-35"></span><span>  </span><span id="c_CopyIcon"><span class="annot"><a href="Graphics.Win32.Icon.html#c_CopyIcon"><span class="hs-identifier hs-var">c_CopyIcon</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HICON"><span class="hs-identifier hs-type">HICON</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HICON"><span class="hs-identifier hs-type">HICON</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="annot"><a href="Graphics.Win32.Icon.html#drawIcon"><span class="hs-identifier hs-type">drawIcon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HICON"><span class="hs-identifier hs-type">HICON</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span id="drawIcon"><span class="annot"><span class="annottext">drawIcon :: HICON -&gt; Int -&gt; Int -&gt; HICON -&gt; IO ()
</span><a href="Graphics.Win32.Icon.html#drawIcon"><span class="hs-identifier hs-var hs-var">drawIcon</span></a></span></span><span> </span><span id="local-6989586621679109197"><span class="annot"><span class="annottext">HICON
</span><a href="#local-6989586621679109197"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span id="local-6989586621679109196"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109196"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679109195"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109195"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621679109194"><span class="annot"><span class="annottext">HICON
</span><a href="#local-6989586621679109194"><span class="hs-identifier hs-var">icon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-39"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Bool -&gt; IO ()
</span><a href="System.Win32.Types.html#failIfFalse_"><span class="hs-identifier hs-var">failIfFalse_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DrawIcon&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Bool -&gt; IO ()) -&gt; IO Bool -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HICON -&gt; Int -&gt; Int -&gt; HICON -&gt; IO Bool
</span><a href="Graphics.Win32.Icon.html#c_DrawIcon"><span class="hs-identifier hs-var">c_DrawIcon</span></a></span><span> </span><span class="annot"><span class="annottext">HICON
</span><a href="#local-6989586621679109197"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109196"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679109195"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">HICON
</span><a href="#local-6989586621679109194"><span class="hs-identifier hs-var">icon</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h DrawIcon&quot;</span><span>
</span><span id="line-41"></span><span>  </span><span id="c_DrawIcon"><span class="annot"><a href="Graphics.Win32.Icon.html#c_DrawIcon"><span class="hs-identifier hs-var">c_DrawIcon</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HDC"><span class="hs-identifier hs-type">HDC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HICON"><span class="hs-identifier hs-type">HICON</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="annot"><a href="Graphics.Win32.Icon.html#destroyIcon"><span class="hs-identifier hs-type">destroyIcon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HICON"><span class="hs-identifier hs-type">HICON</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span id="destroyIcon"><span class="annot"><span class="annottext">destroyIcon :: HICON -&gt; IO ()
</span><a href="Graphics.Win32.Icon.html#destroyIcon"><span class="hs-identifier hs-var hs-var">destroyIcon</span></a></span></span><span> </span><span id="local-6989586621679109190"><span class="annot"><span class="annottext">HICON
</span><a href="#local-6989586621679109190"><span class="hs-identifier hs-var">icon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-45"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO Bool -&gt; IO ()
</span><a href="System.Win32.Types.html#failIfFalse_"><span class="hs-identifier hs-var">failIfFalse_</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DestroyIcon&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO Bool -&gt; IO ()) -&gt; IO Bool -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HICON -&gt; IO Bool
</span><a href="Graphics.Win32.Icon.html#c_DestroyIcon"><span class="hs-identifier hs-var">c_DestroyIcon</span></a></span><span> </span><span class="annot"><span class="annottext">HICON
</span><a href="#local-6989586621679109190"><span class="hs-identifier hs-var">icon</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">WINDOWS_CCONV</span><span> </span><span class="hs-keyword">unsafe</span><span> </span><span class="hs-string">&quot;windows.h DestroyIcon&quot;</span><span>
</span><span id="line-47"></span><span>  </span><span id="c_DestroyIcon"><span class="annot"><a href="Graphics.Win32.Icon.html#c_DestroyIcon"><span class="hs-identifier hs-var">c_DestroyIcon</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Graphics.Win32.GDI.Types.html#HICON"><span class="hs-identifier hs-type">HICON</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-50"></span><span class="hs-comment">-- End</span><span>
</span><span id="line-51"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-52"></span></pre></body></html>